package com.jasonchoi.eurekaconsumer.consume;

import com.jasonchoi.eurekaconsumer.hystrix.HelloFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Spring Cloud 远程调用方式之一 feign
 * 2 * @Author: JasonChoi
 * 3 * @Date: 2019/12/11 17:15
 * 4  这里也需要在系统hosts添加 127.0.0.1 eurekaProduct
 */
@FeignClient(name= "eurekaProduct",fallback = HelloFeignHystrix.class)
public interface HelloFeignConsumer {

    @RequestMapping(value = "/hello")
    String hello(@RequestParam(value = "name") String name);
}
